package request

type TmallServicecenterPictureUploadRequest struct {
	/*
	   图片文件二进制流     */
	Img *[]byte `json:"img" required:"true" `
	/*
	   图片全称包括扩展名。目前支持 jpg jpeg png     */
	PictureName *string `json:"picture_name" required:"true" `
	/*
	   true返回Https地址 defalutValue��true    */
	IsHttps *bool `json:"is_https,omitempty" required:"false" `
}

func (s *TmallServicecenterPictureUploadRequest) SetImg(v []byte) *TmallServicecenterPictureUploadRequest {
	s.Img = &v
	return s
}
func (s *TmallServicecenterPictureUploadRequest) SetPictureName(v string) *TmallServicecenterPictureUploadRequest {
	s.PictureName = &v
	return s
}
func (s *TmallServicecenterPictureUploadRequest) SetIsHttps(v bool) *TmallServicecenterPictureUploadRequest {
	s.IsHttps = &v
	return s
}

func (req *TmallServicecenterPictureUploadRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.PictureName != nil {
		paramMap["picture_name"] = *req.PictureName
	}
	if req.IsHttps != nil {
		paramMap["is_https"] = *req.IsHttps
	}
	return paramMap
}

func (req *TmallServicecenterPictureUploadRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	if req.Img != nil {
		fileMap["img"] = *req.Img
	}
	return fileMap
}
